package net.ycxinxing.mcpebox.ui;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import net.ycxinxing.mcpebox.Pro.R;
import net.ycxinxing.mcpebox.baseActivity;
import net.ycxinxing.mcpebox.mApp;
import net.ycxinxing.mcpebox.mDialog;

public class ErrorActivity extends baseActivity
{
	String log;
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		// TODO: Implement this method
		super.onCreate(savedInstanceState);
		log=getIntent().getExtras().getString("log");
		setContentView(R.layout.activity_error);
	}
	@Override
	public void onBackPressed()
	{
		// TODO: Implement this method
		super.onBackPressed();
		android.os.Process.killProcess(mApp.mPid);
		System.exit(0);
	}
	public void onExitButtonClick(View v)
	{
		android.os.Process.killProcess(mApp.mPid);
		System.exit(0);
	}
	public void onSafeModelButtonClick(View v)
	{
		SharedPreferences sp=getSharedPreferences("data",MODE_PRIVATE);
		sp.edit().putBoolean("safemode",true).commit();
		android.os.Process.killProcess(mApp.mPid);
		System.exit(0);
	}
	public void debug(View v)
	{
		finish();
	}
	public void viewerror(View v)
	{
		mDialog dlg=new mDialog(this){

			@Override
			public void onButtonClick(int i)
			{
				// TODO: Implement this method
			}
		};
		dlg.setTitle("log");
		dlg.setMsg(log);
		dlg.show();
	}
}
